import 'package:flutter/material.dart';
import 'HomeList/ListViewDemo.dart';
// void main(List<String> args) {
//   runApp(App());
// }

void main() => runApp(App());

class App extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false, //debug条幅 隐藏
      home: Home(),
      /*
        Scaffold(
          appBar: AppBar(
            title: Text('test'),
            elevation: 20.0,//阴影
          ),
          body: Hello(),
        ),
        */
      theme: ThemeData(
        primarySwatch: Colors.yellow,
      ), //主题
    );
  }
}

//Home 小部件
class Home extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return DefaultTabController(
      length: 3,
      child: Scaffold(
        backgroundColor: Colors.grey[100],
        appBar: AppBar(
          leading: IconButton(
            icon: Icon(Icons.menu),
            tooltip: 'Navigration',
            onPressed: () => debugPrint('Navigration left Press'),
          ),
          title: Text('test'),
          actions: <Widget>[
            IconButton(
              icon: Icon(Icons.search),
              tooltip: 'search',
              onPressed: () => debugPrint('search  Press'),
            ),
          ],
          // elevation: 20.0,//阴影
          bottom: TabBar(
            tabs: <Widget>[
              Tab(icon: Icon(Icons.local_florist)),
              Tab(icon: Icon(Icons.change_history)),
              Tab(icon: Icon(Icons.directions_bike)),

            ],
          ),
        ),
        body: TabBarView(
          children: <Widget>[
            Icon(Icons.local_florist,size:128.0 ,color: Colors.black12),
            Icon(Icons.change_history,size:128.0 ,color: Colors.black12),
            Icon(Icons.directions_bike,size:128.0 ,color: Colors.black12),
          ],
        )
        // ListViewDemo(),
        //  Hello(),
        )
    );
  }
}
